strComputer = "."
Set objWMIService = GetObject(_
   "winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
   ("SELECT DeviceID FROM Win32_VideoController WHERE CurrentHorizontalResolution > 0")
For Each objItem in colItems
   Wscript.Echo objItem.DeviceID
Next